﻿using System;
using libtcod;

namespace RL
{
    public interface IEntity
    {
        Body Body { get; set; }
        int Y { get; set; }
        int X { get; set; }
        char Model { get; set; }
        TCODColor Color { get; set; }
    }

    public class Entity : IEntity, IRenderable
    {
        private Body _body;
        private GameMap _world;
        public TCODColor Color { get; set; }
        public char Model { get; set; }
        
        public Entity(Point startPos, char pic, TCODColor color)
        {            
            Model = pic;
            Color = color;
            _body = new Body(startPos);
        }

        public bool IsInFoV { get; set; }

        public Body Body
        {
            get { return _body; }
            set { _body = value; }
        }

        public int Y
        {
            get
            {
                return _body.Position.Y;
            }
            set
            {
                _body.Position.Y = value;
            }
        }
        public int X 
        {
            get 
            {
                return _body.Position.X;
            }
            set
            {
                _body.Position.X = value;
            }
        }

        public void Move(MoveType type)
        {
 
            //this._world.Move(this, pos);
        }
    }
}